﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class ProdtermFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As ProdtermBE
        Dim tmpProdterm As ProdtermBE = New ProdtermBE()
        Try
            With tmpProdterm
                .ArchFoto = convertDTFromDb.ConvertString(dr.Item("ArchFoto"))
                .DesCorta = convertDTFromDb.ConvertString(dr.Item("DesCorta"))
                .Descuento = convertDTFromDb.ConvertDecimal(dr.Item("Descuento"))
                .DesLarga = convertDTFromDb.ConvertString(dr.Item("DesLarga"))
                .IdProducto = convertDTFromDb.ConvertString(dr.Item("IdProducto"))
                .Precio = convertDTFromDb.ConvertDecimal(dr.Item("Precio"))
                .ProdServ = convertDTFromDb.ConvertString(dr.Item("ProdServ"))
            End With
            Return tmpProdterm
        Catch ex As Exception
            Throw
        Finally
            tmpProdterm = Nothing
        End Try
    End Function
End Class
